package com.example.demo.controller;


import com.example.demo.service.JobQueuesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author leohe
 * @date 2018/10/31 9:09
 */

@RequestMapping("/job_queues")
@RestController
@Api(tags = "JobQueues", description = "作业队列")
public class JobQueuesController {
    private static final Logger logger = LoggerFactory.getLogger(JobQueuesController.class);

    @Autowired
    private JobQueuesService jobQueuesService;


    /**
     * @author ZSP
     * @description 获取箱的前后位置
     */
    @ApiOperation("获取箱的前后位置")
    @GetMapping("/container_position")
    public String getPositionByVesselContainerRecords(
            @RequestParam("vessel_voyage_number") String vesselVoyageNumber,
            @RequestParam("container_number") String containerNumber,
            @RequestParam("job_type") String jobType) {
        return jobQueuesService.getPositionByVesselContainerRecords(vesselVoyageNumber, containerNumber, jobType);
    }

}
